home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-04-17 | 15.4 KB | 533 lines | [TEXT/MPS ] |
- /*------------------------------------------------------------------------------
- *
- * Mexican Text-to-Speech Installer:
- * Installation of Mexican Text-to-Speech software
- *
- * Copyright © 1994 Apple Computer, Inc.
- * All rights reserved.
- *
- * File: TTS_Mexican_14_Install.r - Rez Source
- *
- * Author: Deric Horn
- *
- * History: <1> (11/8/94) Created this file.
- *
- * Build:
- Make -f 'Installer Script.make' 'Mexican TTS Install Script'
- *
- *----------------------------------------------------------------------------*/
- #include "InstallerTypes.r"
- include "MexicanSpanishTTS.rsrc"; /* vers and splash resources */
-
- // Definition for the user function // Gestalt user functions
- #define chkNotProcessor 1002
- include "GestaltFxns.rsrc" 'infn' (1002) as 'infn' (chkNotProcessor);
-
- #if (Debug)
- include "Installer Debugger.rsrc" NOT 'vers';
- #endif
-
- /* Date is the current release date put in 'icmt' rsrc. ScriptCheck will convert */
- #define currentReleaseDate 4301995 /* Official release date */
- #define kTTSVersion "1.4" /* Version */
- #define kTTSVersionIcmt 140 /* Version goes in the 'icmt' rsrc */
-
- /* CONSTANTS: put a 1 in the creation date field of source 'infs' to have ScriptCheck set date */
- #define kScriptCheckSetsDate 0x01
- #define kMinMemMB 04 /*NOT Used*/ /* memory needed to install (UPDATE Error Message if changed!)*/
-
-
- // Assertions. Must all have unique values.
-
- #define aBootableVolume 1 // Chosen volume can be booted from.
- #define aSystem7 2 // Chosen volume has System 7.5 or later installed.
- #define aProcessorOK 3 // This Mac has a CPU we can run on.
-
-
- /* RULE: Definitions for the rule */
- #define rlBootableVolume 1000
- #define rlSystem7 1001
- #define rl68000 1002
- #define rl68010 1003
- #define rlProcessorOK 1004
- #define rlCheckSystemVersion 1005
- #define rlCheckBootable 1006
- #define rlCheckCPU 1007
- #define rlOKToInstall 1008
- #define rlCustomCheckSystem 1012
- #define rlCustomSystemVersionError 1013
-
- #define diskOrder 1000 /* for indo resource */
-
- #define sourceFileBase 3000
- #define targetFileBase 4000
- #define actionAtomBase sourceFileBase
- #define kTargetSystem 5000 // System file.
- #define kTargetFinder 5001 // Finder.
-
- /* PACKAGES: Definition of the packages. */
- #define pkInstallMexicanTTS 3003
- #define pkInstallSpeechMgrCustom 3004
- #define pkInstallSpeechCDevCustom 3010
- #define pkInstallSpeechMgrExtCustom 3011
-
- /* COMMENT: Definition for the package comment resource */
- #define cmtIMexicanTTS pkInstallMexicanTTS
- #define cmtISpeechMgr pkInstallSpeechMgrCustom
- #define cmtISpeechCDev pkInstallSpeechCDevCustom
- #define cmtISpeechMgrExt pkInstallSpeechMgrExtCustom
-
- #define iconMexicanTTS pkInstallMexicanTTS
- #define iconSpeechMgr pkInstallSpeechMgrCustom
- #define iconSpeechCDev pkInstallSpeechCDevCustom
- #define iconSpeechMgrExt pkInstallSpeechMgrExtCustom
-
- /* SOURCE DISK: This is the name of the source disks */
- #define ProgramDisk1 "Mexican TTS 1:"
- #define ProgramDisk2 "Mexican TTS 2:"
- #define ProgramDisk3 "Mexican TTS 3:"
-
-
- // File ID's
- // These need to be added to sourceFileBase or targetFileBase to get the full ID.
-
- #define fReadMe 1
- #define fSimpleText 2
- #define fSpeechCDev 3
- #define fSpeechMgr 4
- #define fSynth 5
- #define fSpeechCDevNoRemove 33
- #define fSpeechMgrNoRemove 34
- #define fCarlos 50
- #define fCatalina 51
- #define fDefaultVoice 100
- #define fCarlosExtFolder 250
- #define fCatalinaExtFolder 251
-
-
- /***************************** Preferences Resource *****************************************/
-
- // The only reason we need a preferences resource is to specify the help pages. We use
- // the defaults for all other fields.
-
- resource 'inpr' ( 300 ) // Required resource ID.
- {
- format0
- {
- useDiskTargetMode, // Since always install in System Folder.
- dontAllowUserToSetSystemDisk, // Meaningless in Disk Target mode.
- showSelectedSizeInCustom, // Might be some help.
- noSetupFunctionSupplied, // None for now.
- dontAllowCleanInstall, // Not documented but sounds dangerous.
- dontAllowServerAsTarget, // Unsupported and totally dangerous.
-
- '', 0, // No Setup Function.
-
- {
- 401, 421, 401, 421, // Help PICT resource ID's, page 1.
- 402, 422, 402, 422, // Help PICT resource ID's, page 2.
- 403, 423, 403, 423, // Help PICT resource ID's, page 3.
- 404, 424, 404, 424, // Help PICT resource ID's, page 4.
- 405, 425, 405, 425, // Help PICT resource ID's, page 5.
- },
-
- "" // Recommended folder name; not used.
- }
- };
-
- /***************************** indo Resource ************************************************/
- resource 'indo' (DiskOrder) {
- format0 {{
- ProgramDisk1,
- ProgramDisk2,
- ProgramDisk3,
- }};
- };
-
-
- /*********************************** Global Rules ********************************************/
- //
- // Currently, the global rules only set assertions.
-
- resource 'infr' ( kGlobalFrameworkRsrcID ) /* Rule Framework */
- {
- format0
- {{
-
- // Each rule either sets an assertion, or not.
-
- pickAll,
- {
- rlBootableVolume, // Determine whether the chosen volume can be a boot volume.
- rlSystem7 // Determine which version of the OS is installed on the chosen volume.
- },
-
-
- // Determine whether we can run on this CPU.
-
- pickFirst,
- {
- rl68000, // Is this a 68000 which we can't run on?
- rl68010, // Is this a 68010 which we can't run on?
- rlProcessorOK // If we get here, the CPU is OK.
- }
- }}
- };
-
- //------------------------------
- // Test for the chosen volume being bootable.
-
- resource 'inrl' ( rlBootableVolume )
- {
- format0
- {{
- checkFileRsrcForkExists{ kTargetSystem }, // does the system file exist
- checkFileRsrcForkExists{ kTargetFinder }, // does the finder exist
- addAssertion{{ aBootableVolume }}
- }}
- };
-
- //------------------------------
- // Check whether chosen volume has System 7.0 or later.
-
- resource 'inrl' ( rlSystem7 )
- {
- format0
- {{
- checkAllAssertions{{ aBootableVolume }},
- checkFileVersion{ kTargetSystem, 0x7, 0x00, release, 0x0 }, // 7.0.0 or later
- addAssertion{{ aSystem7 }}
- }}
- };
-
- //------------------------------
- // Check whether this Mac has a particular processor.
-
- #define gestaltProcessorType 'proc'
- #define gestalt68000 1
- #define gestalt68010 2
- #define gestalt68020 3
- #define gestalt68030 4
- #define gestalt68040 5
-
- resource 'inrl' ( rl68000 )
- {
- format0
- {{
- checkGestalt { gestaltProcessorType, { gestalt68000 } } // 68000?
- }}
- };
-
- resource 'inrl' ( rl68010 )
- {
- format0
- {{
- checkGestalt { gestaltProcessorType, { gestalt68010 } } // 68010?
- }}
- };
-
- //------------------------------
- // Say that this Mac's CPU is one we support.
-
- resource 'inrl' ( rlProcessorOK )
- {
- format0
- {{
- addAssertion{{ aProcessorOK }}
- }}
- };
-
- /************************** Rule resources for Easy Install **********************************/
-
- resource 'infr' ( kEasyInstallFrameworkRsrcID )
- {
- format0
- {{
- // If System 7.0 isn't installed, alert and don't install.
- // Make sure the hardware supports speech.
- // All rules are run.
-
- pickAll,
- {
- rlCheckCPU, // A processor we can run on?
- rlCheckSystemVersion, // Alert if system too old.
- rlCheckBootable, // Alert if no system at all.
- rlOKToInstall // Add package to install.
- }
- }}
- };
-
- //------------------------------
- // Not speech capable system. If the disk can be booted, report that chosen volume does
- // not have a speech-capable System.
- // This prevents Easy Install from installing.
-
- resource 'inrl' ( rlCheckSystemVersion )
- {
- format0
- {{
- checkAllAssertions{{ aProcessorOK }}, // Don't bother alerting if hardware missing.
- checkAllAssertions{{ aBootableVolume }}, // Don't alert version if disk not bootable.
- checkAllNonAssertions{{ aSystem7 }},
- reportVolError
- {
- "Mexican Spanish Text-to-Speech requires System Software 7.0 or later."
- " Please click Switch Disk to choose another disk."
- }
- }}
- };
-
- //------------------------------
- // Report that chosen volume is not a bootable disk.
- // This prevents Easy Install from installing.
-
- resource 'inrl' ( rlCheckBootable )
- {
- format0
- {{
- checkAllAssertions{{ aProcessorOK }}, // Don't bother alerting if hardware missing.
- checkAllNonAssertions{{ aBootableVolume }},
- reportVolError
- {
- "Mexican Spanish Text-to-Speech must be installed on a disk with system software on it."
- " Please click Switch Disk to choose another disk."
- }
- }}
- };
-
- //------------------------------
- // Test for a processor we support.
-
- resource 'inrl' ( rlCheckCPU )
- {
- format0
- {{
- checkAllNonAssertions{{ aProcessorOK }},
- reportVolError // Not ReportSysError so Custom Install is available.
- {
- "Mexican Spanish Text-to-Speech requires a Macintosh with a 68020 processor or better."
- " It will not run on this Macintosh.\n"
- }
- }}
- };
-
- //------------------------------
- // Assume everything's OK and we can install. If there was a reportVolError
- // that fired, the packages and user descriptions will be suppressed.
-
- resource 'inrl' ( rlOKToInstall )
- {
- format0
- {{
- addUserDescription {"• Mexican Spanish Text-to-Speech Software\n"}, // message to appear in Easy Install screen
- addPackages {{ pkInstallMexicanTTS }}
- }}
- };
-
-
- /************************** Rule resources for Custom Install ********************************/
- // Rule framework.
-
- resource 'infr' ( kCustomInstallFrameworkRsrcID )
- {
- format0
- {{
- // Don't install unless System 7.0 or later is present. It's OK if the
- // hardware isn't right; they may be installing on a disk to be taken
- // to another machine.
-
- pickFirst,
- {
- rlCustomCheckSystem,
- rlCustomSystemVersionError
- }
- }}
- };
-
- //------------------------------
- // If System 7.0 or later, allow installation.
-
- resource 'inrl' ( rlCustomCheckSystem )
- {
- format0
- {{
- checkAllAssertions{{ aBootableVolume, aSystem7 }},
- addCustomItems
- {{
- pkInstallMexicanTTS,
- pkInstallSpeechMgrCustom
- }}
- }}
- };
-
- //------------------------------
- // Report that chosen volume does not have a recognition-capable System.
- // This prevents Custom Install from installing.
-
- resource 'inrl' ( rlCustomSystemVersionError )
- {
- format0
- {{
- reportVolError
- {
- "Mexican Spanish Text-to-Speech requires System Software 7.0 or later."
- " Please click Switch Disk to choose another disk."
- }
- }}
- };
-
- /***************************** Package Resources ************************************************/
- resource 'inpk' (pkInstallMexicanTTS) {
- format0 {
- showsOnCustom, // if a subpackage, then show in Custom Install
- removable, // include package or subpackage as a removeable item
- forceRestart, // make user reboot his computer after install
- cmtIMexicanTTS, // ID of package comments ( 'inpc' ) rsrc defined below
- 0, // Package size ( if 0, filled in by ScriptCheck )
- "Mexican Spanish Text-to-Speech Software", // Custom Install selection text
- {
- // Remove misplaced voices.
- 'infa', sourceFileBase + fCarlosExtFolder; // Delete "Carlos" (Extensions:)
- 'infa', sourceFileBase + fCatalinaExtFolder; // Delete "Catalina" (Extensions:)
-
- // Install.
- 'infa', sourceFileBase + fReadMe; // Install "Using Mexican Spanish TTS"
- 'infa', sourceFileBase + fSimpleText; // Install "SimpleText"
- 'infa', sourceFileBase + fSpeechCDevNoRemove; // Install "Speech"
- 'infa', sourceFileBase + fSpeechMgrNoRemove; // Install "Speech Manager"
- 'inra', sourceFileBase + fDefaultVoice; // Install Resource 'ttsp' (Extensions:Speech Manager)
- 'infa', sourceFileBase + fSynth; // Install "MacinTalk Español Mexicano"
- 'infa', sourceFileBase + fCarlos; // Install "Carlos"
- 'infa', sourceFileBase + fCatalina; // Install "Catalina"
- }
- }
- };
-
-
- //============================================================
- // The Speech Manager packages for Custom Install/Remove.
-
- //------------------------------
- // Speech Manager for System 7 or later, i.e. can install cdev.
-
- resource 'inpk' (pkInstallSpeechMgrCustom)
- {
- format0
- {
- doesntShowOnCustom, // if a subpackage, then show in Custom Install
- removable, // include package or subpackage as a removeable item
- forceRestart, // make user reboot his computer after install
- cmtISpeechMgr, // ID of package comments ( 'inpc' ) rsrc defined below
- 0, // Package size ( if 0, filled in by ScriptCheck )
- "Speech Manager Software", // Custom Install selection text
- {
- 'inpk', pkInstallSpeechMgrExtCustom;// Installs Package "Speech Manager Extension"
- 'inpk', pkInstallSpeechCDevCustom;// Installs Package "Speech Control Panel"
- }
- }
- };
-
- //------------------------------
- // Sub-package for Speech Manager, System 7. Allow user to install just the extension.
-
- resource 'inpk' (pkInstallSpeechMgrExtCustom)
- {
- format0
- {
- showsOnCustom, // if a subpackage, then show in Custom Install
- removable, // include package or subpackage as a removeable item
- forceRestart, // make user reboot his computer after install
- cmtISpeechMgrExt, // ID of package comments ( 'inpc' ) rsrc defined below
- 0, // Package size ( if 0, filled in by ScriptCheck )
- "Speech Manager Extension", // Custom Install selection text
- {
- 'infa', sourceFileBase + fSpeechMgr; // Install "Speech Manager"
- }
- }
- };
-
- //------------------------------
- // Sub-package for Speech Manager, System 7. Allow user to install just the cdev.
-
- resource 'inpk' (pkInstallSpeechCDevCustom)
- {
- format0
- {
- showsOnCustom, // if a subpackage, then show in Custom Install
- removable, // include package or subpackage as a removeable item
- forceRestart, // make user reboot his computer after install
- cmtISpeechCDev, // ID of package comments ( 'inpc' ) rsrc defined below
- 0, // Package size ( if 0, filled in by ScriptCheck )
- "Speech Control Panel", // Custom Install selection text
- {
- 'infa', sourceFileBase + fSpeechCDev; // Install "Speech"
- }
- }
- };
-
- /***************************** Comments ************************************************/
- // NOTE: ignore the warning from ScriptCheck about these comments not being needed
- // because the packages have doesntShowOnCustom set. The custom rules install the
- // packages and then the comments are available.
-
- resource 'icmt' (cmtIMexicanTTS) {
- currentReleaseDate,
- kTTSVersionIcmt,
- iconMexicanTTS,
- "This package contains the software necessary to have Spanish text spoken aloud."
- " Useful on Macintoshes with a 68020 processor or better"
- " and running System Software 7.0 or later."
- };
-
- resource 'icmt' (cmtISpeechMgr) {
- currentReleaseDate,
- kTTSVersionIcmt,
- iconSpeechMgr,
- "This package contains the Speech Manager software, used by all text-to-speech synthesizers."
- };
-
- resource 'icmt' (cmtISpeechMgrExt) {
- currentReleaseDate,
- kTTSVersionIcmt,
- iconSpeechMgr,
- "This package contains the Speech Manager Extension,"
- " required for text-to-speech."
- };
-
- resource 'icmt' (cmtISpeechCDev) {
- currentReleaseDate,
- kTTSVersionIcmt,
- iconSpeechCDev,
- "This package contains the Speech Control Panel,"
- " used to select options for text-to-speech."
- };
-
-
- /***************************** Special File Specs *************************************/
-
- resource 'intf' ( kTargetSystem ) /* File Spec */
- {
- format0
- {
- noSearchForFile,
- TypeCrNeedNotMatch, // Type is 'ZSYS' for 6.0.7, 'zsys' for 7.0.
- 'zsys',
- 'MACS',
- 0x0,
- "special-macs:System"
- }
- };
-
- resource 'infs' ( kTargetFinder ) { /* File Spec */
- 'FNDR',
- 'MACS',
- 0x0,
- noSearchForFile,
- TypeCrMustMatch,
- "special-macs:Finder"
- };
-
-
- /***************************** All Other File Specs *************************************/
- #include "InstallFiles_TTS14_Mexican.r"
-